﻿@model Fcom.VNInsurance.Web.Models.MenuLang
@{
    ViewBag.Title = "EditMenu";
    Layout = "~/Views/Shared/_CpanelLayout.cshtml";
    var selectproduct = (SelectList)ViewBag.SlProduct;
    var MenuPosition = (Fcom.VNInsurance.Web.Models.MenuPosition)ViewBag.Menupostion;
}
<div class="container" style="padding:10px;">
    @using (Html.BeginForm()) { 
        <fieldset>
                 <legend >Thêm Menu - vị trí @MenuPosition.Name</legend>
            </fieldset>
             <div class="form-group">
          Link đến sản phẩm: @Html.DropDownList("slproduct",selectproduct,"Chọn sản phẩm",null)
        </div>
                 <div class="form-group">

            <label for="txttitle">Tiêu đề (*)</label>
             @Html.Hidden("MenuPositionID",MenuPosition.ID)
          
          </div>
          <div class="form-group">
            <label for="cbbNcatID">Name</label>
             @Html.TextBoxFor(m=>m.Name)
          </div>
       
        <div class="form-group">
            <label for="cbbNcatID">Link</label>
             @Html.TextBoxFor(m=>m.Link)
          </div>
          <button type="submit" class="btn btn-success">Lưu</button>
    }

</div>
<script>
    $(document).ready(function () {
        $("#slproduct").change(function () {
            $("#Link").val($(this).val());
            $("#Name").val($("#slproduct option:selected").text());
        });
    });
</script>

